
import React from 'react';
import './index.less';

import {base} from 'nc-lightapp-front';

const {
    NCModal,
    NCButton
} = base;

const {
    Header,
    Body,
    Footer
} = NCModal;

export default (props) => {

    const {
        visible, 
        content, 
        language, 
        closeModal,
        sendOffer
    } = props;

    return (
        <NCModal
            show={visible}
            className="offer-content-modal"
            size="lg"
            onHide={closeModal}
        >
            <Header
                closeButton={true}
            >
                {language['gx6008-000042']/** 发送offer */}
            </Header>
            <Body>
                <div
                    dangerouslySetInnerHTML={{
                        __html: content
                    }}
                ></div>
            </Body>
            <Footer
                className="offer-content-modal-footer"
            >
                <NCButton
                    colors="primary"
                    onClick={() => {
                        sendOffer();
                    }}
                >
                    {language['gx6008-000051']/** 发送 */}
                </NCButton>
                <NCButton
                    onClick={closeModal}
                >
                    {language['gx6008-000025']/** 取消 */}
                </NCButton>
            </Footer>
        </NCModal>
    );
}